/**
 * @file rank/elementary/luogu1146/main.cpp
 * @brief
 * @see
 * @author Ruiming Guo (guoruiming@stu.scu.edu.cn)
 * @copyright 2022
 * @date 2022/7/7 14:02:22
 **/

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
const int N = 110;
int a[N];
int n;
int main() {
  // High rating and good luck!
  cin >> n;
  cout << n << '\n';
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      if (j == i) continue;
      a[j] = !a[j];
    }
    for (int j = 0; j < n; ++j) {
      cout << a[j];
    }
    cout << '\n';
  }
  return 0;
}
